package day06;

import java.util.Scanner;
//方法的演示
public class MethodDemo {
    //修饰词    //无返回值//主/有参:String 数组
    public static void main(String[] args) {
        niuBi();
        System.out.println("继续执行....");
    }
    //修饰词   //无返回值 //方法名，无参
    public static void niuBi(){
     //   System.out.println("大家好");
        int num1 =(int)(Math.random()*10+1);
        do{
            Scanner scan = new Scanner(System.in);
            System.out.println("请输入一个数");
            int num = scan.nextInt();
            if(num==num1){
                System.out.println("你真牛逼");
                break;
            }else{
                System.out.println("再来一次");
            }
        }while (true);
    }
}
